package com.gl.glcourses.view.components
{
	import mx.controls.Image;
	import mx.core.mx_internal;
	
	import spark.components.DropDownList;
	
	use namespace mx_internal;
	
	//use namespace mx_internal;
	
	public class IconComboBox extends DropDownList
	{
		[SkinPart(required="false")]
		public var selectedImage:Image;
		
		/**
		 *  @private 
		 */ 
		override mx_internal function updateLabelDisplay(displayItem:* = undefined):void
		{
			super.updateLabelDisplay();
			
			if (selectedImage)
			{
				if (displayItem == undefined)
					displayItem = selectedItem;
				if (displayItem != null && displayItem != undefined)
				{
					selectedImage.source = displayItem.icon;
				}
			}
		}
		
	}
}